package com.thirteen.app.daoTest;

import com.thirteen.app.entity.Answer;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface PaperObjectiveDao {

    //    插入当前考试构成的主观答案集
    Boolean insertObjective(@Param("examRecordId") Integer examRecordId, @Param("answer") Answer answer);

    //    查询单选答案
    String querySingleAndJudgeAnswer(@Param("examRecordId") Integer examRecordId, @Param("questionId") Integer questionId);

    //    查询多选答案
    List<String> queryMultiAnswer(@Param("examRecordId") Integer examRecordId, @Param("questionId") Integer questionId);

    //    提交单选答案
    Boolean updateSingleAnswer(@Param("examRecordId") Integer examRecordId, @Param("questionId") Integer questionId, @Param("tag") String tag);

    //    提交多选答案
    Boolean updateMultiAnswer(@Param("examRecordId") Integer examRecordId, @Param("questionId") Integer questionId, @Param("tag") String tag);

    //    清除之前的答案
    Boolean cleanMultiAnswer(@Param("examRecordId") Integer examRecordId, @Param("questionId") Integer questionId);

    //    提交判断答案
    Boolean updateJudgeAnswer(@Param("examRecordId") Integer examRecordId, @Param("questionId") Integer questionId, @Param("tag") String tag);

    //    批阅客观题单选 判断
    Integer judgeSingleAndJudge(@Param("examRecordId") Integer examRecordId, @Param("questionId") Integer questionId);

    //    批阅多选题是否有错误
    Integer judgeMultiHaveWrong(@Param("examRecordId") Integer examRecordId, @Param("questionId") Integer questionId);

    //    批阅多选题选择数量
    Integer queryMultiChecked(@Param("examRecordId") Integer examRecordId, @Param("questionId") Integer questionId);

    //    批阅多选题选对数量
    Integer queryMultiRightNum(@Param("examRecordId") Integer examRecordId, @Param("questionId") Integer questionId);

    //    批阅多选题所有正确数量
    Integer queryMultiCheckedRightNum(@Param("examRecordId") Integer examRecordId, @Param("questionId") Integer questionId);

}
